package com.xxgc.eow.mapper;

import com.xxgc.eow.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxgc.eow.entity.Articletitle;
import com.xxgc.eow.entity.Title;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 发表文章 Mapper 接口
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-21
 */
@Mapper
public interface ArticleMapper extends BaseMapper<Article> {
    int insertArticle(Article article);

    List<Article> selectAllArticle();

    List<Article> selectTitleName(int articleId);

    Integer selectTitleIdByTitleName(String titleName);

    List<Article> selectLIKEArticle(Article article);

    int delArticle(@Param("articleId") int articleId, @Param("time") LocalDateTime time);

    int insertArticleTitle(Articletitle articletitle);

    Integer selectArticleId(Article article);

    int updateArticle(Article article);

    int delTitleArticle(int articleId);
    
    List<Article> selectBuUserId(int userId);
}
